package yxy.banana.socket.coder;

import java.net.URI;

import io.netty.channel.ChannelPipeline;

public class WebSocketServerCoder extends WebSocketProtobufCoder {

	private String resource = "/";

	public WebSocketServerCoder(String resource, String subprotocol) {
		super(subprotocol, Part.Server);
		this.resource = resource;
	}

	public WebSocketServerCoder(String resource) {
		this(resource, null);
	}

	@Override
	protected String resource(ChannelPipeline pipeline) {
		return this.resource;
	}

	@Override
	protected URI uri(ChannelPipeline pipeline) {
		return null;
	}

}
